using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace GZ.Projects.WCS_SVC
{
    public class WMSHttpEntity
    {
		#region WMS公用接口头部
		public class WMSResult<T>
		{
			/// <summary>
			/// 返回状态
			/// </summary>
			[DataMember]
			public int code { get; set; }
			/// <summary>
			/// 返回信息
			/// </summary>
			[DataMember]
			public string message { get; set; }
			/// <summary>
			/// 返回数据
			/// </summary>
			[DataMember]
			public T data { get; set; }
		}
		#endregion

		#region 登录
		public class LoginRequest
		{
			/// <summary>
			/// 账号
			/// </summary>
			[DataMember]
			public string account { get; set; }

			/// <summary>
			/// 密码
			/// </summary>
			[DataMember]
			public string password { get; set; }

		}

		public class LoginResponse
		{
			/// <summary>
			/// 
			/// </summary>
			public User user { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string token { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string expireAt { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public List<PermissionsItem> permissions { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public List<RolesItem> roles { get; set; }

		}

		public class User
		{
			/// <summary>
			/// 
			/// </summary>
			public string code { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string name { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string avatar { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string createTime { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string address { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string position { get; set; }
		}

		public class PermissionsItem
		{
			/// <summary>
			/// 
			/// </summary>
			public string id { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public List<string> operation { get; set; }
		}

		public class RolesItem
		{
			/// <summary>
			/// 
			/// </summary>
			public string id { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public List<string> operation { get; set; }
		}
		#endregion

		#region 库区列表
		public class AreaListRequest
		{
			[DataMember]
			public bool isInclueAll { get; set; }

			[DataMember]
			public int pageNo { get; set; }
			[DataMember]
			public int pageSize { get; set; }
			[DataMember]
			public string searchText { get; set; }
			[DataMember]
			public string startTime { get; set; }
			[DataMember]
			public string endTime { get; set; }
		}

		public class AreaListResponse
		{
			/// <summary>
			/// 
			/// </summary>
			public int pageNo { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public int pageSize { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public int totalCount { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string project { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public List<AreaListsColumnInfos> columnInfos { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string isShowAction { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public List<AreaLists> list { get; set; }
		}

		public class AreaLists
		{
			/// <summary>
			/// 
			/// </summary>
			public int id { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string code { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public int state { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string description { get; set; }
		}

		public class AreaListsColumnInfos
		{
			/// <summary>
			/// 
			/// </summary>
			public string title { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string dataIndex { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public int width { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public AreaListsScopedSlots scopedSlots { get; set; }
		}

		public class AreaListsScopedSlots
		{
			/// <summary>
			/// 
			/// </summary>
			public string customRender { get; set; }
		}
		#endregion

		#region 出库列表
		public class OutListRequest
		{
			/// <summary>
			/// 单号
			/// </summary>
			[DataMember]
			public string OrderNo { get; set; }

			/// <summary>
			/// 库区
			/// </summary>
			[DataMember]
			public string Area { get; set; }

		}

		public class outlist
		{
			/// <summary>
			/// 
			/// </summary>
			public string Area { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string SapOrder { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string WmsOrder { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string Location { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string MaterialCode { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public string MaterialDesc { get; set; }
			/// <summary>
			/// 
			/// </summary>
			public double count { get; set; }
		}

		#endregion

		#region IM01.作业任务创建C
		/// <summary>
		/// IM01.作业任务创建C 请求参数
		/// </summary>
		[Serializable]
		[DataContract]
		public class WCreateOrderRequest
		{
			/// <summary>
			/// 作业类型
			/// </summary>
			[DataMember]
			public string ope_type { get; set; }
			/// <summary>
			/// 业务单号
			/// </summary>
			[DataMember]
			public string order_no { get; set; }
			/// <summary>
			/// 载具条码
			/// </summary>
			[DataMember]
			public string tray_code { get; set; }
			/// <summary>
			/// 巷道编码
			/// </summary>
			[DataMember]
			public string tunnel_no { get; set; }
			/// <summary>
			/// 站台编号
			/// </summary>
			[DataMember]
			public string station_code { get; set; }
			/// <summary>
			/// 终点站台编号
			/// </summary>
			[DataMember]
			public string end_station_code { get; set; }
			/// <summary>
			/// 操作时间
			/// </summary>
			[DataMember]
			public DateTime ope_time { get; set; }
			/// <summary>
			/// 操作设备编号
			/// </summary>
			[DataMember]
			public string ope_device_no { get; set; }
			/// <summary>
			/// 操作人
			/// </summary>
			[DataMember]
			public string ope_person { get; set; }
			/// <summary>
			/// 特性值1  华显=是否1.4托盘（0=否，1=是）
			/// </summary>
			[DataMember]
			public string attr1 { get; set; }
			/// <summary>
			/// 特性值2 华显=品质等级（例：A,B,C,.....）
			/// </summary>
			[DataMember]
			public string attr2 { get; set; }
			/// <summary>
			/// 特性值3
			/// </summary>
			[DataMember]
			public string attr3 { get; set; }
			/// <summary>
			/// 物料列表
			/// </summary>
			[DataMember]
			public List<IM01InvInFoRequest> list { get; set; }
		}

		/// <summary>
		/// 物料项
		/// </summary>
		[Serializable]
		[DataContract]
		public class IM01InvInFoRequest
		{
			/// <summary>
			/// 物料条码
			/// </summary>
			[DataMember]
			public string material_code { get; set; }
			/// <summary>
			/// 行号
			/// </summary>
			[DataMember]
			public int line_no { get; set; }
			/// <summary>
			/// 物料编码
			/// </summary>
			[DataMember]
			public string material_no { get; set; }
			/// <summary>
			/// 物料名称
			/// </summary>
			[DataMember]
			public string material_name { get; set; }
			/// <summary>
			/// 物料数量
			/// </summary>
			[DataMember]
			public string material_num { get; set; }
			/// <summary>
			/// 预留1
			/// </summary>
			[DataMember]
			public string reverse_1 { get; set; }
			/// <summary>
			/// 预留2
			/// </summary>
			[DataMember]
			public string reverse_2 { get; set; }
			/// <summary>
			/// 预留3
			/// </summary>
			[DataMember]
			public string reverse_3 { get; set; }
		}

		public class WCreateOrderResponse
		{
			/// <summary>
			/// 单据编号
			/// </summary>
			[DataMember]
			public string order_no { get; set; }
			/// <summary>
			/// 任务编号
			/// </summary>
			[DataMember]
			public string task_no { get; set; }
			/// <summary>
			/// 巷道编号
			/// </summary>
			[DataMember]
			public string tunnel_no { get; set; }
			/// <summary>
			/// 载具条码号
			/// </summary>
			[DataMember]
			public string tray_code { get; set; }
			/// <summary>
			/// 操作时间
			/// </summary>
			[DataMember]
			public string ope_time { get; set; }
			
			public List<IM01InvInFoResponse> list { get; set; }
		}

		public class IM01InvInFoResponse
		{
			/// <summary>
			/// 物料条码号
			/// </summary>
			[DataMember]
			public string material_code { get; set; }
			/// <summary>
			/// 物料编码
			/// </summary>
			[DataMember]
			public string material_no { get; set; }
			/// <summary>
			/// 物料描述
			/// </summary>
			[DataMember]
			public string material_name { get; set; }
		}
		#endregion

		#region IM02.作业任务操作
		/// <summary>
		/// IM01.作业任务创建C 请求参数
		/// </summary>
		[Serializable]
		[DataContract]
		public class WOperationOrderRequest
		{

			/// <summary>
			/// 操作类型 ： CA=任务激活，CS=堆垛机搬运完成，CF=任务完成，CC=任务取消，CJ=抽检结果录入
			/// </summary>
			[DataMember]
			public String ope_type { get; set; }
			/// <summary>
			/// 操作结果
			/// </summary>
			[DataMember]
			public string ope_result { get; set; }
			/// <summary>
			/// 操作结果类型
			/// </summary>
			[DataMember]
			public string ope_result_type { get; set; }
			/// <summary>
			/// 操作备注
			/// </summary>
			[DataMember]
			public string ope_memo { get; set; }
			/// <summary>
			/// 单据编号   ：业务单据编号，例：R22041500001
			/// </summary>
			[DataMember]
			public string order_no { get; set; }
			/// <summary>
			/// 任务编号 ：任务编号，对应WCS主任务编号，例：R22041500001R0001
			/// </summary>
			[DataMember]
			public string task_no { get; set; }
			/// <summary>
			/// 操作时间
			/// </summary>
			[DataMember]
			public DateTime ope_time { get; set; }
			/// <summary>
			/// 操作设备编号
			/// </summary>
			[DataMember]
			public string ope_device_no { get; set; }
			/// <summary>
			/// 操作人
			/// </summary>
			[DataMember]
			public string ope_person { get; set; }
			/// <summary>
			/// 重量数据上报
			/// </summary>
			[DataMember]
			public string ope_weight { get; set; }
			/// <summary>
			/// 检验结果
			/// </summary>
			[DataMember]
			public string ope_check_result { get; set; }
			/// <summary>
			/// 预留1
			/// </summary>
			[DataMember]
			public string reverse_1 { get; set; }
			/// <summary>
			/// 预留2
			/// </summary>
			[DataMember]
			public string reverse_2 { get; set; }
			/// <summary>
			/// 预留3
			/// </summary>
			[DataMember]
			public string reverse_3 { get; set; }
		}

		/// <summary>
		/// WCS作业任务操作C 响应参数
		/// </summary>
		public class WOperationOrderResponse
		{
			/// <summary>
			/// 单据编号
			/// </summary>
			[DataMember]
			public string order_no { get; set; }
			/// <summary>
			/// 任务编号
			/// </summary>
			[DataMember]
			public string task_no { get; set; }
			/// <summary>
			/// 操作结果  ：0=成功，1=失败
			/// </summary>
			[DataMember]
			public int ope_result { get; set; }
			/// <summary>
			/// 结果备注
			/// </summary>
			[DataMember]
			public string ope_memo { get; set; }
			/// <summary>
			/// 操作时间	 ：WCS返回时间
			/// </summary>
			[DataMember]
			public DateTime ope_time { get; set; }


		}

		#endregion

		#region IM03.物料查询及绑定
		/// <summary>
		/// IM03.物料查询及绑定 请求参数
		/// </summary>
		[Serializable]
		[DataContract]
		public class WSearchBindMaterialRequest
		{
			/// <summary>
			/// 操作类型   :1=新增；2=绑定；3=解绑；4=查询
			/// </summary>
			[DataMember]
			public int ope_type { get; set; }
			/// <summary>
			/// 载具条码 :项目定制中无载具选项时，由WCS生成虚拟载具条码号
			/// </summary>
			[DataMember]
			public string tray_code { get; set; }
			/// <summary>
			/// 收货单号
			/// </summary>
			[DataMember]
			public string receipt_no { get; set; }
			/// <summary>
			/// 作业单号
			/// </summary>
			[DataMember]
			public string work_no { get; set; }
			/// <summary>
			/// 操作时间
			/// </summary>
			[DataMember]
			public DateTime ope_time { get; set; }
			/// <summary>
			/// 操作设备编号
			/// </summary>
			[DataMember]
			public string ope_device_no { get; set; }
			/// <summary>
			/// 操作人
			/// </summary>
			[DataMember]
			public string ope_person { get; set; }
			/// <summary>
			/// 物料列表
			/// </summary>
			[DataMember]
			public List<InvInfoRequest> list { get; set; }


		}
		/// <summary>
		/// 物料信息
		/// </summary>
		[Serializable]
		[DataContract]
		public class InvInfoRequest
		{
			/// <summary>
			/// 物料条码
			/// </summary>
			[DataMember]
			public string material_code { get; set; }
			/// <summary>
			/// 行号
			/// </summary>
			[DataMember]
			public int line_no { get; set; }
			/// <summary>
			/// 预留1
			/// </summary>
			[DataMember]
			public string reverse_1 { get; set; }
			/// <summary>
			/// 预留2
			/// </summary>
			[DataMember]
			public string reverse_2 { get; set; }
			/// <summary>
			/// 预留3
			/// </summary>
			[DataMember]
			public string reverse_3 { get; set; }
		}
		/// <summary>
		/// IM03.物料查询及绑定 响应参数
		/// </summary>
		public class WSearchBindMaterialResponse
		{
			/// <summary>
			/// 载具条码
			/// </summary>
			[DataMember]
			public string tray_code { get; set; }
			/// <summary>
			/// 当前状态
			/// </summary>
			[DataMember]
			public string tray_status { get; set; }
			/// <summary>
			/// 当前库位编号
			/// </summary>
			[DataMember]
			public string tray_location_no { get; set; }
			/// <summary>
			/// 单据编号
			/// </summary>
			[DataMember]
			public string tray_order_no { get; set; }
			/// <summary>
			/// 任务编号
			/// </summary>
			[DataMember]
			public string tray_task_no { get; set; }
			/// <summary>
			/// 任务库位编号
			/// </summary>
			[DataMember]
			public string task_location_no { get; set; }
			/// <summary>
			/// 操作时间
			/// </summary>
			[DataMember]
			public DateTime ope_time { get; set; }
			/// <summary>
			/// 收货单号
			/// </summary>
			[DataMember]
			public string receipt_no { get; set; }
			/// <summary>
			/// 作业单号
			/// </summary>
			[DataMember]
			public string work_no { get; set; }
			/// <summary>
			/// 预分配库位
			/// </summary>
			[DataMember]
			public string pre_location { get; set; }
			/// <summary>
			/// 物料状态
			/// </summary>
			[DataMember]
			public string material_status { get; set; }
			/// <summary>
			/// 总数量
			/// </summary>
			[DataMember]
			public string total_num { get; set; }
			/// <summary>
			/// 特性值1
			/// </summary>
			[DataMember]
			public string attr1 { get; set; }
			/// <summary>
			/// 特性值2
			/// </summary>
			[DataMember]
			public string attr2 { get; set; }
			/// <summary>
			/// 特性值3
			/// </summary>
			[DataMember]
			public string attr3 { get; set; }
			/// <summary>
			/// 物料列表
			/// </summary>
			[DataMember]
			public List<InvInfoResponse> list { get; set; }


		}
		/// <summary>
		/// 物料信息
		/// </summary>
		[Serializable]
		[DataContract]
		public class InvInfoResponse
		{
			/// <summary>
			/// 物料条码号
			/// </summary>
			[DataMember]
			public string material_code { get; set; }
			/// <summary>
			/// 当前状态
			/// </summary>
			[DataMember]
			public string material_status { get; set; }
			/// <summary>
			/// 当前库位编号
			/// </summary>
			[DataMember]
			public string material_location_no { get; set; }
			/// <summary>
			/// 单据编号
			/// </summary>
			[DataMember]
			public string material_order_no { get; set; }
			/// <summary>
			/// 任务编号
			/// </summary>
			[DataMember]
			public string material_task_no { get; set; }
			/// <summary>
			/// 任务库位编号
			/// </summary>
			[DataMember]
			public string task_location_no { get; set; }
			/// <summary>
			/// 物料编码
			/// </summary>
			[DataMember]
			public string material_no { get; set; }
			/// <summary>
			/// 物料描述
			/// </summary>
			[DataMember]
			public string material_name { get; set; }
			/// <summary>
			/// 物料批次
			/// </summary>
			[DataMember]
			public string material_patch { get; set; }
			/// <summary>
			/// 数量
			/// </summary>
			[DataMember]
			public float material_num { get; set; }
			/// <summary>
			/// 物料规格
			/// </summary>
			[DataMember]
			public string MaterialSize { get; set; }
			/// <summary>
			/// 抽检结果
			/// </summary>
			[DataMember]
			public string cj_result { get; set; }
			/// <summary>
			/// 不合格类型
			/// </summary>
			[DataMember]
			public string cj_err_type { get; set; }
			/// <summary>
			/// 抽检结果说明
			/// </summary>
			[DataMember]
			public string cj_memo { get; set; }
			/// <summary>
			/// 预留1
			/// </summary>
			[DataMember]
			public string reverse_1 { get; set; }
			/// <summary>
			/// 预留2
			/// </summary>
			[DataMember]
			public string reverse_2 { get; set; }
			/// <summary>
			/// 预留3
			/// </summary>
			[DataMember]
			public string reverse_3 { get; set; }
		}
		#endregion

    }
}